package com.woniuxy.project.campus;

import com.woniuxy.project.campus.canteenModelform.AddAddressForm;
import com.woniuxy.project.campus.canteenModelform.SelectProShopInfo;
import com.woniuxy.project.campus.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name="canteen-service")
public interface CenteenCilnt {



    //通过accessId查询店铺id
    @GetMapping("/canteen/shops/getShopIdByAccessId")
     Result getShopIdByAccessId(@RequestParam("accessId") Integer accessId);

    @GetMapping("/canteen/merchantapplication/viewTheApplicationList")
    Result viewTheApplicationList();


    @PostMapping("/canteen/productList/queryProductDetail")
     Result queryProductDetail(@RequestBody SelectProShopInfo form);

    @GetMapping("/canteen/productList/queryProductDetailById")
     Result queryProductDetailById(@RequestParam("productId") Integer productId);

    @GetMapping("/canteen/productList/queryProductDetailByShopId")
     Result queryProductDetailByShopId(@RequestParam("shopId") Integer shopId);


    @GetMapping("/canteen/shops/getShopInfo")
    Result getShopInfo( @RequestParam("shopId") Integer shopId);

    @PostMapping("/canteen/accountAddress/getAddressId")
     Result getAddressId(@RequestBody AddAddressForm form);

    @GetMapping("/canteen/accountAddress/getAddressByAddressId")
     Result getAddressByAddressId(@RequestParam("id")Integer id);

    @GetMapping("/canteen/productList/queryProductNameId")
    Result queryProductNameId(@RequestParam("productId")Integer productId);
}
